<?php
/**
 * List of Waiting expenses
 * 
 * @author Xavier VILAIN
 */
use Fox\Dao\SqlFragment;
use Hive\Expense;
$finder = new Expense();
$expenses = $finder->find(new SqlFragment("idusr = ? AND status = ? ",
							array(User::current()->getId(),
								  Expense::STATUS_REFUSED)));

$grid = Xview::instance()->component("expenses","grid");
/* @var $grid Fox\Grid */
$grid->fieldcat()->switchToObjectMode();
$grid->setDatas($expenses);
$grid->setTotal();
return $grid;